<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: arm_compute/core/Error.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">18.03</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
      <li><a href="globals.xhtml"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('core_2_error_8h_source.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Error.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="core_2_error_8h.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2016-2018 ARM Limited.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * of this software and associated documentation files (the &quot;Software&quot;), to</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * deal in the Software without restriction, including without limitation the</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#ifndef __ARM_COMPUTE_ERROR_H__</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#define __ARM_COMPUTE_ERROR_H__</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;stdarg.h&gt;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacearm__compute.xhtml">arm_compute</a></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;{</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05f">   32</a></span>&#160;<span class="keyword">enum class</span> <a class="code" href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05f">ErrorCode</a></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;{</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <a class="code" href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05fae0aa021e21dddbd6d8cecec71e9cf564">OK</a>,           </div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <a class="code" href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05fa62be47fdd89da032cf78dfce82239579">RUNTIME_ERROR</a> </div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;};</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_status.xhtml">   39</a></span>&#160;<span class="keyword">class </span><a class="code" href="classarm__compute_1_1_status.xhtml">Status</a></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;{</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_status.xhtml#aafde58df1b2a6a91d5b674373be3ffc5">   43</a></span>&#160;    <a class="code" href="classarm__compute_1_1_status.xhtml#aafde58df1b2a6a91d5b674373be3ffc5">Status</a>()</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        : _code(<a class="code" href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05f">ErrorCode</a>::<a class="code" href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05fae0aa021e21dddbd6d8cecec71e9cf564">OK</a>), _error_description(<span class="stringliteral">&quot; &quot;</span>)</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    {</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    }</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_status.xhtml#ac99a5dea2bc1b688ba6ecb82f593ad63">   52</a></span>&#160;    <span class="keyword">explicit</span> <a class="code" href="classarm__compute_1_1_status.xhtml#ac99a5dea2bc1b688ba6ecb82f593ad63">Status</a>(<a class="code" href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05f">ErrorCode</a> error_status, std::string error_description = <span class="stringliteral">&quot; &quot;</span>)</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        : _code(error_status), _error_description(error_description)</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    {</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    }</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <a class="code" href="classarm__compute_1_1_status.xhtml">Status</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_status.xhtml">Status</a> &amp;) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <a class="code" href="classarm__compute_1_1_status.xhtml">Status</a>(<a class="code" href="classarm__compute_1_1_status.xhtml">Status</a> &amp;&amp;) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <a class="code" href="classarm__compute_1_1_status.xhtml">Status</a> &amp;operator=(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_status.xhtml">Status</a> &amp;) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <a class="code" href="classarm__compute_1_1_status.xhtml">Status</a> &amp;operator=(<a class="code" href="classarm__compute_1_1_status.xhtml">Status</a> &amp;&amp;) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_status.xhtml#a420e60e9788bfa3b52aa3aab72ea3a5e">   68</a></span>&#160;    <span class="keyword">explicit</span> <span class="keyword">operator</span> bool() const noexcept</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    {</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        <span class="keywordflow">return</span> _code == <a class="code" href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05fae0aa021e21dddbd6d8cecec71e9cf564">ErrorCode::OK</a>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    }</div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_status.xhtml#ad42c93e88c8862d8cdd0d90f2fe7b380">   76</a></span>&#160;    <a class="code" href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05f">ErrorCode</a> <a class="code" href="classarm__compute_1_1_status.xhtml#ad42c93e88c8862d8cdd0d90f2fe7b380">error_code</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keywordflow">return</span> _code;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    }</div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_status.xhtml#aa4580fbc2bd7dfcd8fd2de2825e34e57">   84</a></span>&#160;    std::string <a class="code" href="classarm__compute_1_1_status.xhtml#aa4580fbc2bd7dfcd8fd2de2825e34e57">error_description</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keywordflow">return</span> _error_description;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    }</div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_status.xhtml#aa7d8800a4d8aa8ad934293b280d446fd">   89</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_status.xhtml#aa7d8800a4d8aa8ad934293b280d446fd">throw_if_error</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <span class="keywordflow">if</span>(!<span class="keywordtype">bool</span>(*<span class="keyword">this</span>))</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        {</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;            internal_throw_on_error();</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        }</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    }</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    [[noreturn]] <span class="keywordtype">void</span> internal_throw_on_error() <span class="keyword">const</span>;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <a class="code" href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05f">ErrorCode</a>   _code;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    std::string _error_description;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;};</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;<a class="code" href="classarm__compute_1_1_status.xhtml">Status</a> <a class="code" href="namespacearm__compute.xhtml#a2edb6ec8bea5c26d7d802d21caf64d02">create_error_va_list</a>(<a class="code" href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05f">ErrorCode</a> error_code, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keyword">function</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *file, <span class="keyword">const</span> <span class="keywordtype">int</span> line, <span class="keyword">const</span> <span class="keywordtype">char</span> *msg, va_list <a class="code" href="namespacecaffe__data__extractor.xhtml#a8187411843a6284ffb964ef3fb9fcab3">args</a>);</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<a class="code" href="classarm__compute_1_1_status.xhtml">Status</a> <a class="code" href="namespacearm__compute.xhtml#a3eee3c80d78ee4574a5eed0af5af919d">create_error</a>(<a class="code" href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05f">ErrorCode</a> error_code, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keyword">function</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *file, <span class="keyword">const</span> <span class="keywordtype">int</span> line, <span class="keyword">const</span> <span class="keywordtype">char</span> *msg, ...);</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;[[noreturn]] <span class="keywordtype">void</span> <a class="code" href="namespacearm__compute.xhtml#a568b0fbfa3d903099d9c9f7b6acf188d">error</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keyword">function</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *file, <span class="keyword">const</span> <span class="keywordtype">int</span> line, <span class="keyword">const</span> <span class="keywordtype">char</span> *msg, ...);</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;}</div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#a4103adbb45806b2f2002d44b91d0d206">  147</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_UNUSED(var) (void)(var)</span></div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#a046fbca6a9505ce038bc02830c739fed">  154</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_CREATE_ERROR(error_code, ...) ::arm_compute::create_error(error_code, __func__, __FILE__, __LINE__, __VA_ARGS__) // NOLINT</span></div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#ac00c754f27b1201dd72c74b73239ff47">  164</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_CREATE_ERROR_LOC(error_code, func, file, line, ...) ::arm_compute::create_error(error_code, func, file, line, __VA_ARGS__) // NOLINT</span></div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#a8a1e1c105f0bdaf37db408c7cfcb77a4">  170</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_RETURN_ON_ERROR(status) \</span></div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="preprocessor">    do                                      \</span></div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;<span class="preprocessor">    {                                       \</span></div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="preprocessor">        if(!bool(status))                   \</span></div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;<span class="preprocessor">        {                                   \</span></div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;<span class="preprocessor">            return status;                  \</span></div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;<span class="preprocessor">        }                                   \</span></div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<span class="preprocessor">    } while(false)</span></div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#a51e206ee52bcfb358919ee478d9fdc47">  183</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_THROW_ON_ERROR(error) \</span></div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="preprocessor">    error.throw_if_error();</span></div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#a86084036bd3851575ef871ad5bf079a7">  191</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, ...)                                               \</span></div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<span class="preprocessor">    do                                                                                           \</span></div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="preprocessor">    {                                                                                            \</span></div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;<span class="preprocessor">        if(cond)                                                                                 \</span></div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;<span class="preprocessor">        {                                                                                        \</span></div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;<span class="preprocessor">            return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, __VA_ARGS__); \</span></div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;<span class="preprocessor">        }                                                                                        \</span></div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="preprocessor">    } while(false)</span></div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;</div><div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#ab4ebbfbeedd9d66614ddbfdb14199cbf">  208</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG(cond, func, file, line, ...)                                               \</span></div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="preprocessor">    do                                                                                                                 \</span></div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;<span class="preprocessor">    {                                                                                                                  \</span></div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;<span class="preprocessor">        if(cond)                                                                                                       \</span></div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;<span class="preprocessor">        {                                                                                                              \</span></div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;<span class="preprocessor">            return ARM_COMPUTE_CREATE_ERROR_LOC(arm_compute::ErrorCode::RUNTIME_ERROR, func, file, line, __VA_ARGS__); \</span></div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;<span class="preprocessor">        }                                                                                                              \</span></div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;<span class="preprocessor">    } while(false)</span></div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div><div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#a206d6e247e0957ac3dee45d27756fc25">  221</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_RETURN_ERROR_ON(cond) \</span></div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;<span class="preprocessor">    ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, #cond)</span></div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#aab9171b209dda7cc9bb560486674c9f6">  231</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_RETURN_ERROR_ON_LOC(cond, func, file, line) \</span></div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="preprocessor">    ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG(cond, func, file, line, #cond)</span></div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">  238</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_ERROR(...) ::arm_compute::error(__func__, __FILE__, __LINE__, __VA_ARGS__) // NOLINT</span></div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;</div><div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#af93757c5021d1802b094dfbead459391">  247</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_ERROR_LOC(func, file, line, ...) ::arm_compute::error(func, file, line, __VA_ARGS__) // NOLINT</span></div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;<span class="preprocessor">#ifdef ARM_COMPUTE_ASSERTS_ENABLED</span></div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;<span class="preprocessor">#define ARM_COMPUTE_ERROR_THROW_ON(status) \</span></div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;<span class="preprocessor">    status.throw_if_error()</span></div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;<span class="preprocessor">#define ARM_COMPUTE_ERROR_ON_MSG(cond, ...) \</span></div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;<span class="preprocessor">    do                                      \</span></div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;<span class="preprocessor">    {                                       \</span></div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;<span class="preprocessor">        if(cond)                            \</span></div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;<span class="preprocessor">        {                                   \</span></div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;<span class="preprocessor">            ARM_COMPUTE_ERROR(__VA_ARGS__); \</span></div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;<span class="preprocessor">        }                                   \</span></div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;<span class="preprocessor">    } while(0)</span></div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;<span class="preprocessor">#define ARM_COMPUTE_ERROR_ON_LOC_MSG(cond, func, file, line, ...) \</span></div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;<span class="preprocessor">    do                                                            \</span></div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;<span class="preprocessor">    {                                                             \</span></div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;<span class="preprocessor">        if(cond)                                                  \</span></div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;<span class="preprocessor">        {                                                         \</span></div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;<span class="preprocessor">            ARM_COMPUTE_ERROR_LOC(func, file, line, __VA_ARGS__); \</span></div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;<span class="preprocessor">        }                                                         \</span></div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;<span class="preprocessor">    } while(0)</span></div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;<span class="preprocessor">#define ARM_COMPUTE_CONST_ON_ERROR(cond, val, msg) (cond) ? throw std::logic_error(msg) : val;</span></div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;<span class="preprocessor">#else </span><span class="comment">/* ARM_COMPUTE_ASSERTS_ENABLED */</span><span class="preprocessor"></span></div><div class="line"><a name="l00296"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#a938dcd406ce611ef5345ad2531cdb948">  296</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_ERROR_THROW_ON(status)</span></div><div class="line"><a name="l00297"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">  297</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_ERROR_ON_MSG(cond, ...)</span></div><div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#a1b62e396a1789909dadda61ea4cda96f">  298</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_ERROR_ON_LOC_MSG(cond, func, file, line, ...)</span></div><div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#a50048c593c53405cca5b0d69dfe25554">  299</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_CONST_ON_ERROR(cond, val, msg) val</span></div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* ARM_COMPUTE_ASSERTS_ENABLED */</span><span class="preprocessor"></span></div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;</div><div class="line"><a name="l00306"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">  306</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_ERROR_ON(cond) \</span></div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;<span class="preprocessor">    ARM_COMPUTE_ERROR_ON_MSG(cond, #cond)</span></div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;</div><div class="line"><a name="l00316"></a><span class="lineno"><a class="line" href="core_2_error_8h.xhtml#ac90c3bce005225cbaa4a43740917bb58">  316</a></span>&#160;<span class="preprocessor">#define ARM_COMPUTE_ERROR_ON_LOC(cond, func, file, line) \</span></div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;<span class="preprocessor">    ARM_COMPUTE_ERROR_ON_LOC_MSG(cond, func, file, line, #cond)</span></div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __ARM_COMPUTE_ERROR_H__ */</span><span class="preprocessor"></span></div><div class="ttc" id="classarm__compute_1_1_status_xhtml_aa4580fbc2bd7dfcd8fd2de2825e34e57"><div class="ttname"><a href="classarm__compute_1_1_status.xhtml#aa4580fbc2bd7dfcd8fd2de2825e34e57">arm_compute::Status::error_description</a></div><div class="ttdeci">std::string error_description() const </div><div class="ttdoc">Gets error description if any. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00084">Error.h:84</a></div></div>
<div class="ttc" id="classarm__compute_1_1_status_xhtml_aa7d8800a4d8aa8ad934293b280d446fd"><div class="ttname"><a href="classarm__compute_1_1_status.xhtml#aa7d8800a4d8aa8ad934293b280d446fd">arm_compute::Status::throw_if_error</a></div><div class="ttdeci">void throw_if_error() const </div><div class="ttdoc">Throws a runtime exception in case it contains a valid error status. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00089">Error.h:89</a></div></div>
<div class="ttc" id="classarm__compute_1_1_status_xhtml_ac99a5dea2bc1b688ba6ecb82f593ad63"><div class="ttname"><a href="classarm__compute_1_1_status.xhtml#ac99a5dea2bc1b688ba6ecb82f593ad63">arm_compute::Status::Status</a></div><div class="ttdeci">Status(ErrorCode error_status, std::string error_description=&quot; &quot;)</div><div class="ttdoc">Default Constructor. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00052">Error.h:52</a></div></div>
<div class="ttc" id="classarm__compute_1_1_status_xhtml_ad42c93e88c8862d8cdd0d90f2fe7b380"><div class="ttname"><a href="classarm__compute_1_1_status.xhtml#ad42c93e88c8862d8cdd0d90f2fe7b380">arm_compute::Status::error_code</a></div><div class="ttdeci">ErrorCode error_code() const </div><div class="ttdoc">Gets error code. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00076">Error.h:76</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a59e56af19e754a6aa26a612ebf91d05fae0aa021e21dddbd6d8cecec71e9cf564"><div class="ttname"><a href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05fae0aa021e21dddbd6d8cecec71e9cf564">arm_compute::ErrorCode::OK</a></div><div class="ttdoc">No error. </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a2edb6ec8bea5c26d7d802d21caf64d02"><div class="ttname"><a href="namespacearm__compute.xhtml#a2edb6ec8bea5c26d7d802d21caf64d02">arm_compute::create_error_va_list</a></div><div class="ttdeci">Status create_error_va_list(ErrorCode error_code, const char *function, const char *file, const int line, const char *msg, va_list args)</div><div class="ttdoc">Creates an error containing the error message from variable argument list. </div></div>
<div class="ttc" id="classarm__compute_1_1_status_xhtml"><div class="ttname"><a href="classarm__compute_1_1_status.xhtml">arm_compute::Status</a></div><div class="ttdoc">Status class. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00039">Error.h:39</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml"><div class="ttname"><a href="namespacearm__compute.xhtml">arm_compute</a></div><div class="ttdoc">This file contains all available output stages for GEMMLowp on OpenCL. </div><div class="ttdef"><b>Definition:</b> <a href="00__introduction_8dox_source.xhtml#l00001">00_introduction.dox:1</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a3eee3c80d78ee4574a5eed0af5af919d"><div class="ttname"><a href="namespacearm__compute.xhtml#a3eee3c80d78ee4574a5eed0af5af919d">arm_compute::create_error</a></div><div class="ttdeci">Status create_error(ErrorCode error_code, const char *function, const char *file, const int line, const char *msg,...)</div><div class="ttdoc">Creates an error containing the error message. </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a568b0fbfa3d903099d9c9f7b6acf188d"><div class="ttname"><a href="namespacearm__compute.xhtml#a568b0fbfa3d903099d9c9f7b6acf188d">arm_compute::error</a></div><div class="ttdeci">void error(const char *function, const char *file, const int line, const char *msg,...)</div><div class="ttdoc">Print an error message then throw an std::runtime_error. </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a59e56af19e754a6aa26a612ebf91d05f"><div class="ttname"><a href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05f">arm_compute::ErrorCode</a></div><div class="ttdeci">ErrorCode</div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00032">Error.h:32</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a59e56af19e754a6aa26a612ebf91d05fa62be47fdd89da032cf78dfce82239579"><div class="ttname"><a href="namespacearm__compute.xhtml#a59e56af19e754a6aa26a612ebf91d05fa62be47fdd89da032cf78dfce82239579">arm_compute::ErrorCode::RUNTIME_ERROR</a></div><div class="ttdoc">Generic runtime error. </div></div>
<div class="ttc" id="namespacecaffe__data__extractor_xhtml_a8187411843a6284ffb964ef3fb9fcab3"><div class="ttname"><a href="namespacecaffe__data__extractor.xhtml#a8187411843a6284ffb964ef3fb9fcab3">caffe_data_extractor.args</a></div><div class="ttdeci">args</div><div class="ttdef"><b>Definition:</b> <a href="caffe__data__extractor_8py_source.xhtml#l00021">caffe_data_extractor.py:21</a></div></div>
<div class="ttc" id="classarm__compute_1_1_status_xhtml_aafde58df1b2a6a91d5b674373be3ffc5"><div class="ttname"><a href="classarm__compute_1_1_status.xhtml#aafde58df1b2a6a91d5b674373be3ffc5">arm_compute::Status::Status</a></div><div class="ttdeci">Status()</div><div class="ttdoc">Default Constructor. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00043">Error.h:43</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_214608ef36d61442cb2b0c1c4e9a7def.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="dir_1fb090f0c6070330bfaccc4236d3ca0d.xhtml">core</a></li><li class="navelem"><a class="el" href="core_2_error_8h.xhtml">Error.h</a></li>
    <li class="footer">Generated on Fri Mar 2 2018 12:37:51 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
